package dca.sistemascontrole.view.configuracao;

import dca.sistemascontrole.handler.HandlerMainFrame;
import dca.sistemascontrole.handler.HandlerPainelMalhaVisível;
import java.awt.event.HierarchyEvent;
import java.awt.event.HierarchyListener;
import javax.swing.JOptionPane;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import org.apache.commons.math3.complex.Complex;

/**
 *
 * @author Teles
 */
public class PanelSeguidorReferencia extends javax.swing.JPanel {

    private HandlerMainFrame handlerMainFrame;

    public PanelSeguidorReferencia(HandlerMainFrame handlerMainFrame) {
        initComponents();
        this.handlerMainFrame = handlerMainFrame;
        
        adicionarDocumentListener();
        
        addHierarchyListener(new HierarchyListener() {
            public void hierarchyChanged(HierarchyEvent e) {
                hierarchyChangedEvent();
            }
        });
    }

    private void hierarchyChangedEvent() {
        boolean isExibidoAtual = isShowing();
        if (HandlerPainelMalhaVisível.getMalhaAtual() != HandlerPainelMalhaVisível.SEGUIDOR_REFERENCIA && isExibidoAtual) {
            handlerMainFrame.interromper();

            HandlerPainelMalhaVisível.setMalhaAtual(HandlerPainelMalhaVisível.SEGUIDOR_REFERENCIA);
        }
    }

    private void calcularGanhos(){
        if (txtGanho1.hasFocus() || txtGanho2.hasFocus() || txtGanho3.hasFocus()) {
            return;
        }

        float real1;
        float real2;
        float real3;
        float imaginario1;
        float imaginario2;
        float imaginario3;

        String real1STR = txtReal1.getText().trim().replace(",", ".");
        if (!validarEntrada(real1STR)) {
            return;
        }
        String real2STR = txtReal2.getText().trim().replace(",", ".");
        if (!validarEntrada(real2STR)) {
            return;
        }
        String real3STR = txtReal3.getText().trim().replace(",", ".");
        if (!validarEntrada(real3STR)) {
            return;
        }
        
        String imaginario1STR = txtImangario1.getText().trim().replace(",", ".");
        if (!validarEntrada(imaginario1STR)) {
            return;
        }
        String imaginario2STR = txtImangario2.getText().trim().replace(",", ".");
        if (!validarEntrada(imaginario2STR)) {
            return;
        }
        String imaginario3STR = txtImangario3.getText().trim().replace(",", ".");
        if (!validarEntrada(imaginario3STR)) {
            return;
        }
        
        real1 = Float.parseFloat(real1STR);
        real2 = Float.parseFloat(real2STR);
        real3 = Float.parseFloat(real3STR);
        
        imaginario1 = Float.parseFloat(imaginario1STR);
        imaginario2 = Float.parseFloat(imaginario2STR);
        imaginario3 = Float.parseFloat(imaginario3STR);
        
        Complex polo1 = new Complex(real1, imaginario1);
        Complex polo2 = new Complex(real2, imaginario2);
        Complex polo3 = new Complex(real3, imaginario3);
        
        //TODO calcular e setar o texto
    }
    
    private void calcularPolos(){
        if (!txtGanho1.hasFocus() && !txtGanho2.hasFocus() && !txtGanho3.hasFocus() ) {
            return;
        }

        double ganho1;
        double ganho2;
        double ganho3;

        String ganho1STR = txtGanho1.getText().trim().replace(",", ".");
        if (!validarEntrada(ganho1STR)) {
            return;
        }
        String ganho2STR = txtGanho2.getText().trim().replace(",", ".");
        if (!validarEntrada(ganho2STR)) {
            return;
        }
        String ganho3STR = txtGanho3.getText().trim().replace(",", ".");
        if (!validarEntrada(ganho3STR)) {
            return;
        }

        ganho1 = Double.parseDouble(ganho1STR);
        ganho2 = Double.parseDouble(ganho2STR);
        ganho3 = Double.parseDouble(ganho3STR);
        
        //TODO calcular e setar o texto
    }
    
    private boolean validarEntrada(String s) {
        try {
            Float.parseFloat(s);
        } catch (NumberFormatException ex) {
            return false;
        }

        return true;
    }
    
    private void adicionarDocumentListener() {
        txtGanho1.getDocument().addDocumentListener(new DocumentListener() {
            public void insertUpdate(DocumentEvent e) {
                calcularPolos();
            }

            public void removeUpdate(DocumentEvent e) {
                calcularPolos();
            }

            public void changedUpdate(DocumentEvent e) {
                calcularPolos();
            }
        });
        txtGanho2.getDocument().addDocumentListener(new DocumentListener() {
            public void insertUpdate(DocumentEvent e) {
                calcularPolos();
            }

            public void removeUpdate(DocumentEvent e) {
                calcularPolos();
            }

            public void changedUpdate(DocumentEvent e) {
                calcularPolos();
            }
        });
        txtGanho3.getDocument().addDocumentListener(new DocumentListener() {
            public void insertUpdate(DocumentEvent e) {
                calcularPolos();
            }

            public void removeUpdate(DocumentEvent e) {
                calcularPolos();
            }

            public void changedUpdate(DocumentEvent e) {
                calcularPolos();
            }
        });

        txtReal1.getDocument().addDocumentListener(new DocumentListener() {
            public void insertUpdate(DocumentEvent e) {
                calcularGanhos();
            }

            public void removeUpdate(DocumentEvent e) {
                calcularGanhos();
            }

            public void changedUpdate(DocumentEvent e) {
                calcularGanhos();
            }
        });
        txtReal2.getDocument().addDocumentListener(new DocumentListener() {
            public void insertUpdate(DocumentEvent e) {
                calcularGanhos();
            }

            public void removeUpdate(DocumentEvent e) {
                calcularGanhos();
            }

            public void changedUpdate(DocumentEvent e) {
                calcularGanhos();
            }
        });
        txtReal3.getDocument().addDocumentListener(new DocumentListener() {
            public void insertUpdate(DocumentEvent e) {
                calcularGanhos();
            }

            public void removeUpdate(DocumentEvent e) {
                calcularGanhos();
            }

            public void changedUpdate(DocumentEvent e) {
                calcularGanhos();
            }
        });

        txtImangario1.getDocument().addDocumentListener(new DocumentListener() {
            public void insertUpdate(DocumentEvent e) {
                calcularGanhos();
            }

            public void removeUpdate(DocumentEvent e) {
                calcularGanhos();
            }

            public void changedUpdate(DocumentEvent e) {
                calcularGanhos();
            }
        });
        txtImangario2.getDocument().addDocumentListener(new DocumentListener() {
            public void insertUpdate(DocumentEvent e) {
                calcularGanhos();
            }

            public void removeUpdate(DocumentEvent e) {
                calcularGanhos();
            }

            public void changedUpdate(DocumentEvent e) {
                calcularGanhos();
            }
        });
        txtImangario3.getDocument().addDocumentListener(new DocumentListener() {
            public void insertUpdate(DocumentEvent e) {
                calcularGanhos();
            }

            public void removeUpdate(DocumentEvent e) {
                calcularGanhos();
            }

            public void changedUpdate(DocumentEvent e) {
                calcularGanhos();
            }
        });        
    }
    
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        txtReal2 = new javax.swing.JTextField();
        txtImangario2 = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        txtGanho2 = new javax.swing.JTextField();
        jPanel6 = new javax.swing.JPanel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        txtReal1 = new javax.swing.JTextField();
        txtImangario1 = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        txtGanho1 = new javax.swing.JTextField();
        jPanel8 = new javax.swing.JPanel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        txtReal3 = new javax.swing.JTextField();
        txtImangario3 = new javax.swing.JTextField();
        jLabel21 = new javax.swing.JLabel();
        txtGanho3 = new javax.swing.JTextField();
        btnDefinir = new dca.sistemascontrole.view.components.CustomButton();
        txtSetpoint = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();

        setBackground(new java.awt.Color(255, 255, 255));

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));
        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Polo 2"));

        jLabel1.setText("Real:");

        jLabel2.setText("Imaginária:");

        jLabel3.setText("Ganho:");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtImangario2)
                    .addComponent(txtGanho2)
                    .addComponent(txtReal2))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(txtReal2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtImangario2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(txtGanho2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jPanel6.setBackground(new java.awt.Color(255, 255, 255));
        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Polo 1"));

        jLabel13.setText("Real:");

        jLabel14.setText("Imaginária:");

        jLabel15.setText("Ganho:");

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jLabel14, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
                    .addComponent(jLabel13, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtImangario1, javax.swing.GroupLayout.DEFAULT_SIZE, 127, Short.MAX_VALUE)
                    .addComponent(txtGanho1)
                    .addComponent(txtReal1))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(txtReal1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtImangario1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel14))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(txtGanho1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jPanel8.setBackground(new java.awt.Color(255, 255, 255));
        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder("Polo 3"));

        jLabel19.setText("Real:");

        jLabel20.setText("Imaginária:");

        jLabel21.setText("Ganho:");

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jLabel20, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
                    .addComponent(jLabel19, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtImangario3, javax.swing.GroupLayout.DEFAULT_SIZE, 127, Short.MAX_VALUE)
                    .addComponent(txtGanho3)
                    .addComponent(txtReal3))
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(txtReal3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtImangario3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel20))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(txtGanho3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        btnDefinir.setText("Definir");
        btnDefinir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDefinirActionPerformed(evt);
            }
        });

        txtSetpoint.setText(" ");

        jLabel4.setText("Setpoint:");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(btnDefinir, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtSetpoint)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtSetpoint, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnDefinir, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jLabel4, txtSetpoint});

    }// </editor-fold>//GEN-END:initComponents

    private void btnDefinirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDefinirActionPerformed
        float ganho1;
        float ganho2;
        float ganho3;
        float setpoint;

        String setpointSTR = txtSetpoint.getText().trim().replace(",", ".");
        if (!validarEntrada(setpointSTR)) {
            JOptionPane.showMessageDialog(this, "Setpoint inválido");
            return;
        }
        setpoint = Float.parseFloat(setpointSTR);
        
        String ganho1STR = txtGanho1.getText().trim().replace(",", ".");
        if (!validarEntrada(ganho1STR)) {
            JOptionPane.showMessageDialog(this, "Ganho 1 inválido");
            return;
        }
        ganho1 = Float.parseFloat(ganho1STR);

        String ganho2STR = txtGanho2.getText().trim().replace(",", ".");
        if (!validarEntrada(ganho2STR)) {
            JOptionPane.showMessageDialog(this, "Ganho 2 inválido");
            return;
        }
        ganho2 = Float.parseFloat(ganho2STR);
        
        String ganho3STR = txtGanho3.getText().trim().replace(",", ".");
        if (!validarEntrada(ganho3STR)) {
            JOptionPane.showMessageDialog(this, "Ganho 3 inválido");
            return;
        }
        ganho3 = Float.parseFloat(ganho3STR);

        handlerMainFrame.setSeguidorDeReferencia(setpoint, ganho1, ganho2, ganho3);
    }//GEN-LAST:event_btnDefinirActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private dca.sistemascontrole.view.components.CustomButton btnDefinir;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JTextField txtGanho1;
    private javax.swing.JTextField txtGanho2;
    private javax.swing.JTextField txtGanho3;
    private javax.swing.JTextField txtImangario1;
    private javax.swing.JTextField txtImangario2;
    private javax.swing.JTextField txtImangario3;
    private javax.swing.JTextField txtReal1;
    private javax.swing.JTextField txtReal2;
    private javax.swing.JTextField txtReal3;
    private javax.swing.JTextField txtSetpoint;
    // End of variables declaration//GEN-END:variables
}
